Skip to content

Add some micro-optimizations to IntersectsSphere - #4213

Closed
FlaggAC wants to merge 1 commit into
ACEmulator:masterfrom
Flaggs-ACE-Contributions:rf/performance/intersects-sphere
Closed

FlaggAC wants to merge 1 commit into
ACEmulator:masterfrom
Flaggs-ACE-Contributions:rf/performance/intersects-sphere

Conversation

@FlaggAC

@FlaggAC FlaggAC commented Aug 11, 2024

Copy link
Copy Markdown
Contributor

Using the local variables when possible can simplify the branching optimization and fetch operations. This method is called very frequently, so even a small change can have an impact here. The positive effect of using local variables is non-zero even with the assumption that optimizations and CPU caching are under ideal conditions.

This method is called very frequently.
@FlaggAC

FlaggAC commented Aug 12, 2024

Copy link
Copy Markdown
Contributor Author

This is probably not going to be helpful (maybe in Debug builds, which ACE mods tend to go with for some reason). Closing for now.

@FlaggAC FlaggAC closed this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant